/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.hera.process.workflow.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author cmontes
 */
@Embeddable
public class ProcessSupervisorPK implements Serializable {
    /**
	 * 
	 */
	private static final long serialVersionUID = -9202905732820655383L;
	@Basic(optional = false)
    @Column(name = "ID_PROCESS")
    private Long idProcess;
    @Basic(optional = false)
    @Column(name = "ID_USER")
    private Long idUser;

    public ProcessSupervisorPK() {
    }

    public ProcessSupervisorPK(Long idProcess, Long idUser) {
        this.idProcess = idProcess;
        this.idUser = idUser;
    }

    public Long getIdProcess() {
        return idProcess;
    }

    public void setIdProcess(Long idProcess) {
        this.idProcess = idProcess;
    }

    public Long getIdUser() {
        return idUser;
    }

    public void setIdUser(Long idUser) {
        this.idUser = idUser;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idProcess != null ? idProcess.hashCode() : 0);
        hash += (idUser != null ? idUser.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        
        if (!(object instanceof ProcessSupervisorPK)) {
            return false;
        }
        ProcessSupervisorPK other = (ProcessSupervisorPK) object;
        if ((this.idProcess == null && other.idProcess != null) || (this.idProcess != null && !this.idProcess.equals(other.idProcess))) {
            return false;
        }
        if ((this.idUser == null && other.idUser != null) || (this.idUser != null && !this.idUser.equals(other.idUser))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.hera.process.data.domain2.ProcessSupervisorPK[ idProcess=" + idProcess + ", idUser=" + idUser + " ]";
    }
    
}
